<template>
  <div id="app">
    <router-view></router-view>
    <!-- 导航 -->
    <van-tabbar
      v-model="$route.meta.num"
      :route="true"
      v-show="$route.meta.show"
      active-color="#ee0a24"
      inactive-color="#000"
    >
      <van-tabbar-item icon="home-o" to="/">首页</van-tabbar-item>
      <van-tabbar-item icon="label-o" to="/subject">专题</van-tabbar-item>
      <van-tabbar-item icon="apps-o" to="/cate">分类</van-tabbar-item>
      <van-tabbar-item icon="cart-o" to="/cart" @click="gou()"
        >购物车</van-tabbar-item
      >
      <van-tabbar-item icon="user-o" to="/mine">我的</van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script>
export default {
  data() {
    return {
      active: 0,
    };
  },

  created() {},
  methods: {
    gou() {
      //  let token = localStorage.getItem("token");
      //  if(token){
      //   //  this.router.push('/car')
      //   location.href="/cart"
      //  }
      //  else{
      //   location.href="/mine"
      //  }
    },
  },
};
</script>
<style lang='less'>
#app {
  width: 100%;
  background: #efefef;
  min-height: 100%;
  font-size: 0.16rem;
}
html,
body {
  height: 100%;
  font-size: 100px !important;
}
.fl {
  float: left;
}
.fr {
  float: right;
}
</style>